package com.cloud.basic.Advance.Design.SingletonPattern;

/**
 * @program: basic
 * @description: 静态内部类
 * @author: Cloud
 * @create: 2022/2/23 15:37:09
 */
public class AbstractSingleton5 {

    private AbstractSingleton5() {
    }

    private static class SingletonHodler {
        private static AbstractSingleton5 singleton5 = new AbstractSingleton5();
    }

    public static AbstractSingleton5 getInstance(){
        return SingletonHodler.singleton5;
    }

    public enum Singleton5 {
        SINGLETON_5;

        public void getSingleton5(){}
    }
}
